# Snowflake

The Snowflake actions allow you to interact with Snowflake by running submitting statements and inserting files. These actions work with specified Snowflake instances which are defined in given scenarios.

This connector supports multiple authentication methods to connect to the Snowflake API.

The first type of supported authentication is Key Pair Authentication which is described by this documentation: Key Pair Auth (opens new window). Select "keyauth" in the connector's configuration screen to use this type of authentication.

The second type of supported authentication is Azure OAuth which is described by this documentation: Azure OAuth (opens new window). Select "Azure OAuth" in the connector's configuration screen to use this type of authentication.

The third type of supported authentication is Okta OAuth which is described by this documentation: Okta OAuth (opens new window). Select "Okta OAuth" in the connector's configuration screen to use this type of authentication.

# Clear Token

Clear Token

Action Function: This action will clear the cached OAuth token for the given scenario. It can be used for scenarios using Azure OAuth and Okta OAuth.

Action Properties:

Label

A label for the action

Scenario

The name of the scenario for which to clear the token.

Error Message Variable

An error message (if an error occurred) will be returned in this variable.

Action Outputs

  • Success - The action executed successfully

  • Failure - An issue was encountered

# Get Statement Status

Get Statement Status

Action Function: This action will get the status of the statement ran by the "Submit Statement" action.

Action Properties:

Label

A label for the action

Scenario

The name of the scenario in the connector configuration document.

Statement Handle

The Statement Handle ID returned by the Submit Statement action.

Web Timeout

The length of time the request is given before it times out. Leave blank for a default timeout.

Request Status Variable

The HTTP status will be returned in this variable.

Response Variable

The HTTP response will be returned in this variable.

Error Message Variable

An error message (if an error occurred) will be returned in this variable.

Action Outputs

  • Success - The action executed successfully

  • Failure - An issue was encountered

# Insert File

Insert File

Action Function: This action will tell Snowflake to insert the specified file or files into a table.

Action Properties:

Label

A label for the action

Scenario

The name of the scenario in the connector configuration document.

Pipe Name

The case-sensitive fully-qualified pipe name.

Request Body

The request body for the REST call.

Example:

{ "files":[ { "path":"filePath/file1.csv", "size":100 }, { "path":"filePath/file2.csv", "size":100 } ] }

Snowflake documentation (look at the post body section): Insert Files Documentation (opens new window)

Web Timeout

The length of time the request is given before it times out. Leave blank for a default timeout.

Request Status Variable

The HTTP status will be returned in this variable.

Response Variable

The HTTP response will be returned in this variable.

Error Message Variable

An error message (if an error occurred) will be returned in this variable.

Action Outputs

  • Success - The action executed successfully

  • Failure - An issue was encountered

# Submit Statement

Submit Statement

Action Function: This action will submit select statements to Snowflake for execution

Action Properties:

Label

A label for the action

Scenario

The name of the scenario in the connector configuration document.

Request Body

The request body for the REST call.

Example:

{ "statement": "show databases;", "database": "SF_TUTS", "schema": "PUBLIC", "warehouse": "SF_TUTS_WH" }

There are multiple request body properties, see the Snowflake documentation for more details: Statements Documentation (opens new window)

Web Timeout

The length of time the request is given before it times out. Leave blank for a default timeout.

Request Status Variable

The HTTP status will be returned in this variable.

Response Variable

The HTTP response will be returned in this variable.

Error Message Variable

An error message (if an error occurred) will be returned in this variable.

Action Outputs

  • Success - The action executed successfully

  • Failure - An issue was encountered